package com.dk;

import java.util.HashMap;
import java.util.Map;

public class RES {
    private int code;
    private String msg;
    private Map<String,Object> dataMap;

    public RES(){
        dataMap=new HashMap<>();
    }

    public int getCode() {
        return code;
    }

    public RES setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public RES setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Map<String, Object> getDataMap() {
        return dataMap;
    }

    public RES addData(String name,Object value){
        this.dataMap.put(name,value);
        return this;
    }

    @Override
    public String toString() {
        return "RES{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", dataMap=" + dataMap +
                '}';
    }
}
